<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
// +----------------------------------------------------------------------

namespace Home\Controller;
use OT\DataDictionary;

/**
 * 前台首页控制器
 * 主要获取首页聚合数据
 */
class BaseController extends \Think\Controller {


    /**
     * 后台控制器初始化
     */
    protected function _initialize(){
          $UID=cookie("cookie_login_auth_user_id");
          if(empty($UID)){
              define("UID",session("login_auth_user_id"));
          }else{
              define("UID",$UID);
          }
         if(!UID){
             $this->redirect(U("Index/index"));
         }
    }
}

?>